package com.simulation.superlotto.controller;

import com.simulation.superlotto.common.json.ResponseJson;
import com.simulation.superlotto.model.Rule;
import com.simulation.superlotto.model.Superlotto;
import com.simulation.superlotto.service.SuperlottoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import static com.simulation.superlotto.common.json.ResponseJson.success;

/**
 * @author ：黄坤
 * @date ：创建于 2020/12/1
 * @description ：
 * @version: 1.0
 */
@RestController
@RequestMapping("/superlotto")
public class SuperlottoController {

     @Autowired
     private SuperlottoService superlottoService;


    /**
     *
     * @param number 随机数量
     * @return
     */
    @RequestMapping("/number")
    public ResponseJson ss(int number){
        Superlotto superlotto = superlottoService.superlotto(number);
        return success(superlotto);
    }
    @PostMapping("/cc")
    public ResponseJson cc(int id,String week){
        System.out.println(id);
        System.out.println(week);
        return success();
    }

    @RequestMapping("/dd")
    public ResponseJson dd(int id,String week){
        System.out.println(id);
        System.out.println(week);
        return success();
    }


}
